package com.cirkana.viewer.route.gpx;

import java.util.Date;

import com.cirkana.CirkanaUtil;

public class WayPoint {

	private Double lat;
	private Double lon;
	private Double ele;
	private Date time;
	private String name;
	private String cmt;
	private String desc;

	protected WayPoint() {
	}

	protected WayPoint(Double lat, Double lon, Double ele, Date time,
			String name, String cmt, String desc) {
		this.lat = lat;
		this.lon = lon;
		this.ele = ele;
		this.time = time;
		this.name = name;
		this.cmt = cmt;
		this.desc = desc;
	}

	public Double getLat() {
		return lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}

	public Double getLon() {
		return lon;
	}

	public void setLon(Double lon) {
		this.lon = lon;
	}

	public Double getEle() {
		return ele;
	}

	public void setEle(Double ele) {
		this.ele = ele;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCmt() {
		return cmt;
	}

	public void setCmt(String cmt) {
		this.cmt = cmt;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public static WayPoint getWayPoint() {
		return new WayPoint();
	}

	public static WayPoint getWayPoint(Double lat, Double lon, Double ele,
			Date time, String name, String cmt, String desc) {
		return new WayPoint(lat, lon, ele, time, name, cmt, desc);
	}

	@Override
	public String toString() {
		StringBuilder s = new StringBuilder();
		s.append("wayPoint={name=" + name);
		s.append(",desc=" + desc);
		s.append(",cmt=" + cmt);
		s.append(",lat=" + Double.toString(lat));
		s.append(",lon=" + Double.toString(lon));
		s.append(",ele=" + Double.toString(ele));
		s.append(",time=" + CirkanaUtil.dateFormat.format(time) + "}");
		return s.toString();
	}
}
